package com.example.qxfw.slhx.controller;

import com.example.qxfw.common.SysResult;
import com.example.qxfw.common.entity.zy.HxyjWarning;
import com.example.qxfw.slhx.service.HxfbService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

@ApiIgnore
@Api(tags = "森林火险--火险发布")
@CrossOrigin
@RestController
@RequestMapping("/FireInsuranceReleaseController")
public class FireInsuranceReleaseController {
    @Autowired
    private HxfbService hxfbService;

    @ApiOperation("森林火险--火险发布-预警列表")
    @GetMapping("/getAllHxyjWarning")
    public SysResult getAllHxyjWarning(){
        List<HxyjWarning> list = hxfbService.getAllHxyjWarning();
        return SysResult.success(list);
    }

    @ApiOperation("森林火险--火险发布-预警列表")
    @GetMapping("/selectStateOfHxyjWarning")
    public SysResult selectStateOfHxyjWarning(){
        List<HxyjWarning> list = hxfbService.selectStateOfHxyjWarning();
        return SysResult.success(list);
    }

    @ApiOperation("森林火险--火险发布-预警发布")
    @GetMapping("/WarnPublishOfHxyjWarning")
    public SysResult WarnPublishOfHxyjWarning(String warmID, String third){
        List<HxyjWarning> list = hxfbService.WarnPublishOfHxyjWarning(warmID, third);
        return SysResult.success(list);
    }

    @ApiOperation("森林火险--火险发布-实况分析")
    @GetMapping("/RealTimeAnalysis")
    public SysResult RealTimeAnalysis(){
        return null;
    }




}
